package org.cqu_proj.demo.dao;

import org.cqu_proj.demo.entity.UserFeatures;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;
import java.util.Optional;

public interface UserFeaturesRepository extends MongoRepository<UserFeatures, String> {
    // 根据userId查找UserFeature
   // UserFeatures findByUserId(int userId);
    // 根据 userId 查找 UserFeature，返回 Optional<UserFeatures>（处理空值）
    Optional<UserFeatures> findByUserId(int userId);
    List<UserFeatures> findAll();
}
